<template>
    <div>
        <template v-if="nodeId">
            <handle-node v-if="nodeType === 'handle'" v-on="$listeners" v-bind="$attrs" />
            <approval-node v-else-if="nodeType === 'approval'" v-on="$listeners" v-bind="$attrs" />
            <connect-line v-else-if="nodeType === 'connect'" v-on="$listeners" v-bind="$attrs" />
            <copy-node v-else-if="nodeType === 'copy'" v-on="$listeners" v-bind="$attrs" />
        </template>
    </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";

import HandleNode from "./handle-node/index.vue";
import ApprovalNode from "./approval-node/index.vue";
import ConnectLine from "./connect-line/index.vue";
import CopyNode from "./copy-node/index.vue";

@Component({
    name: "AddOperationOptionsNotAlive",
    components: {
        HandleNode,
        ApprovalNode,
        ConnectLine,
        CopyNode
    }
})
export default class AddOperationOptions extends Vue {
    @Prop({ default: "" }) private nodeId!: string
    @Prop({ default: "" }) private nodeType!: string
}
</script>

<style lang="scss" scoped>
</style>
